// Source File Name:   Code.java

package com.vhly.classfile;

import com.vhly.classfile.bytecode.*;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Vector;

// Referenced classes of package com.vhly.classfile:
//            LineNumberTable, LocalVariableTable, Attribute, ExceptionTable, 
//            CPUtf8, Unknown, ConstantPool, Debug

public class Code
        implements Attribute {

    private int name_index;
    private int data_len;
    private int max_stack;
    private int max_locals;
    private int code_length;
    private byte bytecode[];
    private int exception_len;
    private Vector exceptions;
    private int attrib_len;
    private Vector atts;
    private int line_index;
    private int local_index;
    private static ConstantPool cp;
    private BCD bcd;


    public Code(ConstantPool constantpool) {
        max_stack = 5;
        max_locals = 5;
        code_length = 1;
        bytecode = new byte[code_length];
        exception_len = 0;
        exceptions = new Vector();
        attrib_len = 0;
        atts = new Vector();
        line_index = -1;
        local_index = -1;
        cp = constantpool;
        bcd = new BCD();
        bcd.setCode(this);
    }

    public void delLineNumberTable() {
        if (line_index == -1)
            return;
        removeAttribute(line_index);
        line_index = -1;
        if (local_index != -1)
            local_index--;
    }

    public void delLocalVariableTable() {
        if (local_index == -1)
            return;
        removeAttribute(local_index);
        local_index = -1;
        if (line_index != -1)
            line_index--;
    }

    public void setLineIndex(int i) {
        line_index = i;
    }

    public int getLineIndex() {
        return line_index;
    }

    public LineNumberTable getLineNumberTable() {
        return (LineNumberTable) atts.elementAt(line_index);
    }

    public void setLocalIndex(int i) {
        local_index = i;
    }

    public int getLocalIndex() {
        return local_index;
    }

    public LocalVariableTable getLocalVariableTable() {
        return (LocalVariableTable) atts.elementAt(local_index);
    }

    public int getMaxStack() {
        return max_stack;
    }

    public void setMaxStack(int i) {
        max_stack = i;
    }

    public int getMaxLocals() {
        return max_locals;
    }

    public void setMaxLocals(int i) {
        max_locals = i;
    }

    public int getCodeLength() {
        code_length = bcd.getAllLength();
        return code_length;
    }

    public void setCodeLength(int i) {
        code_length = i;
    }

    public int getExceptionCount() {
        return exception_len;
    }

    public void setExceptionCount(int ec) {
        exception_len = ec;
    }

    public Enumeration getExceptions() {
        return exceptions.elements();
    }

    public int getAttributeCount() {
        attrib_len = atts.size();
        return attrib_len;
    }

    public Attribute getAttribute(int i) {
        if (i < 0)
            return null;
        if (i >= atts.size())
            return null;
        if (atts.isEmpty())
            return null;
        else
            return (Attribute) atts.elementAt(i);
    }

    public Enumeration getAttributes() {
        return atts.elements();
    }

    public boolean removeAttribute(Attribute attribute) {
        if (atts.contains(attribute)) {
            boolean flag = atts.removeElement(attribute);
            atts.trimToSize();
            if (flag) {
                attrib_len = atts.size();
                data_len = data_len - (6 + attribute.getDataLen());
            }
            return flag;
        } else {
            return false;
        }
    }

    public boolean removeAttribute(int i) {
        if (i >= atts.size()) {
            return false;
        } else {
            Attribute attribute = (Attribute) atts.remove(i);
            atts.trimToSize();
            attrib_len = atts.size();
            data_len = data_len - (6 + attribute.getDataLen());
            attribute = null;
            return true;
        }
    }

    public void setNameIndex(int i) {
        name_index = i;
    }

    public int getNameIndex() {
        return name_index;
    }

    public void setDataLen(int i) {
        data_len = i;
    }

    public int getDataLen() {
        if (code_length != bcd.getAllLength()) {
            data_len = data_len - (code_length - bcd.getAllLength());
            code_length = bcd.getAllLength();
        }
        return data_len;
    }

    public void read(DataInputStream datainputstream, boolean flag)
            throws IOException {
        if (flag)
            name_index = datainputstream.readUnsignedShort();
        data_len = datainputstream.readInt();
        boolean flag1 = false;
        max_stack = datainputstream.readUnsignedShort();
        max_locals = datainputstream.readUnsignedShort();
        code_length = datainputstream.readInt();
        bytecode = new byte[code_length];
        datainputstream.read(bytecode, 0, code_length);
        readBCD(bytecode);
        exception_len = datainputstream.readUnsignedShort();
        if (exception_len != 0) {
            for (int j = 0; j < exception_len; j++) {
                ExceptionTable exceptiontable = new ExceptionTable();
                exceptiontable.read(datainputstream);
                exceptions.add(exceptiontable);
            }

        }
        attrib_len = datainputstream.readUnsignedShort();
        if (attrib_len != 0) {
            for (int k = 0; k < attrib_len; k++) {
                int l = datainputstream.readUnsignedShort();
                CPEntry cpe = cp.getCPEntryAtIndex(l);
                CPUtf8 cputf8 = (CPUtf8) cpe;
                String s = cputf8.getString().trim();
                if (s.equals("LineNumberTable")) {
                    line_index = k;
                    LineNumberTable linenumbertable = new LineNumberTable();
                    linenumbertable.setNameIndex(l);
                    linenumbertable.read(datainputstream, false);
                    atts.add(linenumbertable);
                    continue;
                }
                if (s.equals("LocalVariableTable")) {
                    local_index = k;
                    LocalVariableTable localvariabletable = new LocalVariableTable();
                    localvariabletable.setNameIndex(l);
                    localvariabletable.read(datainputstream, false);
                    atts.add(localvariabletable);
                    if (Debug.isEnabled())
                        System.out.println((new StringBuilder()).append("  Read Code 's Attribute: LocalVariableTable, Index:").append(k).toString());
                } else {
                    Unknown unknown = new Unknown();
                    unknown.setNameIndex(l);
                    unknown.read(datainputstream, false);
                    atts.add(unknown);
                }
            }

        }
    }

    public void write(DataOutputStream dout)
            throws IOException {
        dout.writeShort(name_index);
        data_len = getDataLen();
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attrib name_index:").append(name_index).toString());
        dout.writeInt(data_len);
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attrib Data_len:").append(data_len).toString());
        dout.writeShort(max_stack);
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attrib max_stack:").append(max_stack).toString());
        dout.writeShort(max_locals);
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attrib max_local:").append(max_locals).toString());
        writeBCD(dout);
        exception_len = exceptions.size();
        dout.writeShort(exception_len);
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attrib exception_count:").append(exception_len).toString());
        int j = exceptions.size();
        for (int k = 0; k < j; k++) {
            ExceptionTable exceptiontable = (ExceptionTable) exceptions.elementAt(k);
            exceptiontable.write(dout);
        }

        attrib_len = atts.size();
        dout.writeShort(attrib_len);
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write Code Attribs Count:").append(attrib_len).toString());
        if (attrib_len != 0) {
            for (int l = 0; l < attrib_len; l++) {
                Attribute attribute = (Attribute) atts.elementAt(l);
                attribute.write(dout);
            }

        }
    }

    public int getType() {
        return 3;
    }

    private void readBCD(byte buf[])
            throws IOException {
        ByteArrayInputStream bain = new ByteArrayInputStream(buf);
        DataInputStream din = new DataInputStream(bain);
        if (Debug.isEnable())
            System.out.println((new StringBuilder()).append("**** CodeByte length is ").append(code_length).toString());
        int i = 0;
        int j = 0;
        do {
            if (i >= code_length)
                break;
            int k = din.readUnsignedByte();
            switch (k) {
                case 0: // '\0'
                    NOP nop = new NOP();
                    nop.setOffset(i);
                    nop.read(din);
                    i += nop.length();
                    bcd.add(nop);
                    break;

                case 1: // '\001'
                    ACONST_NULL aconst_null = new ACONST_NULL();
                    aconst_null.setOffset(i);
                    aconst_null.read(din);
                    i += aconst_null.length();
                    bcd.add(aconst_null);
                    break;

                case 2: // '\002'
                    ICONST_m1 iconst_m1 = new ICONST_m1();
                    iconst_m1.read(din);
                    i += iconst_m1.length();
                    iconst_m1.setOffset(i);
                    bcd.add(iconst_m1);
                    break;

                case 3: // '\003'
                    ICONST_0 iconst_0 = new ICONST_0();
                    iconst_0.read(din);
                    i += iconst_0.length();
                    iconst_0.setOffset(i);
                    bcd.add(iconst_0);
                    break;

                case 4: // '\004'
                    ICONST_1 iconst_1 = new ICONST_1();
                    iconst_1.read(din);
                    i += iconst_1.length();
                    iconst_1.setOffset(i);
                    bcd.add(iconst_1);
                    break;

                case 5: // '\005'
                    ICONST_2 iconst_2 = new ICONST_2();
                    iconst_2.read(din);
                    i += iconst_2.length();
                    iconst_2.setOffset(i);
                    bcd.add(iconst_2);
                    break;

                case 6: // '\006'
                    ICONST_3 iconst_3 = new ICONST_3();
                    iconst_3.read(din);
                    i += iconst_3.length();
                    iconst_3.setOffset(i);
                    bcd.add(iconst_3);
                    break;

                case 7: // '\007'
                    ICONST_4 iconst_4 = new ICONST_4();
                    iconst_4.read(din);
                    i += iconst_4.length();
                    iconst_4.setOffset(i);
                    bcd.add(iconst_4);
                    break;

                case 8: // '\b'
                    ICONST_5 iconst_5 = new ICONST_5();
                    iconst_5.read(din);
                    i += iconst_5.length();
                    iconst_5.setOffset(i);
                    bcd.add(iconst_5);
                    break;

                case 9: // '\t'
                    LCONST_0 lconst_0 = new LCONST_0();
                    lconst_0.read(din);
                    i += lconst_0.length();
                    lconst_0.setOffset(i);
                    bcd.add(lconst_0);
                    break;

                case 10: // '\n'
                    LCONST_1 lconst_1 = new LCONST_1();
                    lconst_1.read(din);
                    i += lconst_1.length();
                    lconst_1.setOffset(i);
                    bcd.add(lconst_1);
                    break;

                case 11: // '\013'
                    FCONST_0 fconst_0 = new FCONST_0();
                    fconst_0.read(din);
                    i += fconst_0.length();
                    fconst_0.setOffset(i);
                    bcd.add(fconst_0);
                    break;

                case 12: // '\f'
                    FCONST_1 fconst_1 = new FCONST_1();
                    fconst_1.read(din);
                    i += fconst_1.length();
                    fconst_1.setOffset(i);
                    bcd.add(fconst_1);
                    break;

                case 13: // '\r'
                    FCONST_2 fconst_2 = new FCONST_2();
                    fconst_2.read(din);
                    i += fconst_2.length();
                    fconst_2.setOffset(i);
                    bcd.add(fconst_2);
                    break;

                case 14: // '\016'
                    DCONST_0 dconst_0 = new DCONST_0();
                    dconst_0.read(din);
                    i += dconst_0.length();
                    dconst_0.setOffset(i);
                    bcd.add(dconst_0);
                    break;

                case 15: // '\017'
                    DCONST_1 dconst_1 = new DCONST_1();
                    dconst_1.read(din);
                    i += dconst_1.length();
                    dconst_1.setOffset(i);
                    bcd.add(dconst_1);
                    break;

                case 16: // '\020'
                    BIPUSH bipush = new BIPUSH();
                    bipush.read(din);
                    i += bipush.length();
                    bipush.setOffset(i);
                    bcd.add(bipush);
                    break;

                case 17: // '\021'
                    SIPUSH sipush = new SIPUSH();
                    sipush.read(din);
                    i += sipush.length();
                    sipush.setOffset(i);
                    bcd.add(sipush);
                    break;

                case 18: // '\022'
                    LDC ldc = new LDC();
                    ldc.read(din);
                    i += ldc.length();
                    ldc.setOffset(i);
                    bcd.add(ldc);
                    break;

                case 19: // '\023'
                    LDC_W ldc_w = new LDC_W();
                    ldc_w.read(din);
                    i += ldc_w.length();
                    ldc_w.setOffset(i);
                    bcd.add(ldc_w);
                    break;

                case 20: // '\024'
                    LDC2_W ldc2_w = new LDC2_W();
                    ldc2_w.read(din);
                    i += ldc2_w.length();
                    ldc2_w.setOffset(i);
                    bcd.add(ldc2_w);
                    break;

                case 21: // '\025'
                    ILOAD iload = new ILOAD();
                    iload.read(din);
                    i += iload.length();
                    iload.setOffset(i);
                    bcd.add(iload);
                    break;

                case 22: // '\026'
                    LLOAD lload = new LLOAD();
                    lload.read(din);
                    i += lload.length();
                    lload.setOffset(i);
                    bcd.add(lload);
                    break;

                case 23: // '\027'
                    FLOAD fload = new FLOAD();
                    fload.read(din);
                    i += fload.length();
                    fload.setOffset(i);
                    bcd.add(fload);
                    break;

                case 24: // '\030'
                    DLOAD dload = new DLOAD();
                    dload.read(din);
                    i += dload.length();
                    dload.setOffset(i);
                    bcd.add(dload);
                    break;

                case 25: // '\031'
                    ALOAD aload = new ALOAD();
                    aload.read(din);
                    i += aload.length();
                    aload.setOffset(i);
                    bcd.add(aload);
                    break;

                case 26: // '\032'
                    ILOAD_0 iload_0 = new ILOAD_0();
                    iload_0.read(din);
                    i += iload_0.length();
                    iload_0.setOffset(i);
                    bcd.add(iload_0);
                    break;

                case 27: // '\033'
                    ILOAD_1 iload_1 = new ILOAD_1();
                    iload_1.read(din);
                    i += iload_1.length();
                    iload_1.setOffset(i);
                    bcd.add(iload_1);
                    break;

                case 28: // '\034'
                    ILOAD_2 iload_2 = new ILOAD_2();
                    iload_2.read(din);
                    i += iload_2.length();
                    iload_2.setOffset(i);
                    bcd.add(iload_2);
                    break;

                case 29: // '\035'
                    ILOAD_3 iload_3 = new ILOAD_3();
                    iload_3.read(din);
                    i += iload_3.length();
                    iload_3.setOffset(i);
                    bcd.add(iload_3);
                    break;

                case 30: // '\036'
                    LLOAD_0 lload_0 = new LLOAD_0();
                    lload_0.read(din);
                    i += lload_0.length();
                    lload_0.setOffset(i);
                    bcd.add(lload_0);
                    break;

                case 31: // '\037'
                    LLOAD_1 lload_1 = new LLOAD_1();
                    lload_1.read(din);
                    i += lload_1.length();
                    lload_1.setOffset(i);
                    bcd.add(lload_1);
                    break;

                case 32: // ' '
                    LLOAD_2 lload_2 = new LLOAD_2();
                    lload_2.read(din);
                    i += lload_2.length();
                    lload_2.setOffset(i);
                    bcd.add(lload_2);
                    break;

                case 33: // '!'
                    LLOAD_3 lload_3 = new LLOAD_3();
                    lload_3.read(din);
                    i += lload_3.length();
                    lload_3.setOffset(i);
                    bcd.add(lload_3);
                    break;

                case 34: // '"'
                    FLOAD_0 fload_0 = new FLOAD_0();
                    fload_0.read(din);
                    i += fload_0.length();
                    fload_0.setOffset(i);
                    bcd.add(fload_0);
                    break;

                case 35: // '#'
                    FLOAD_1 fload_1 = new FLOAD_1();
                    fload_1.read(din);
                    i += fload_1.length();
                    fload_1.setOffset(i);
                    bcd.add(fload_1);
                    break;

                case 36: // '$'
                    FLOAD_2 fload_2 = new FLOAD_2();
                    fload_2.read(din);
                    i += fload_2.length();
                    fload_2.setOffset(i);
                    bcd.add(fload_2);
                    break;

                case 37: // '%'
                    FLOAD_3 fload_3 = new FLOAD_3();
                    fload_3.read(din);
                    i += fload_3.length();
                    fload_3.setOffset(i);
                    bcd.add(fload_3);
                    break;

                case 38: // '&'
                    DLOAD_0 dload_0 = new DLOAD_0();
                    dload_0.read(din);
                    i += dload_0.length();
                    dload_0.setOffset(i);
                    bcd.add(dload_0);
                    break;

                case 39: // '\''
                    DLOAD_1 dload_1 = new DLOAD_1();
                    dload_1.read(din);
                    i += dload_1.length();
                    dload_1.setOffset(i);
                    bcd.add(dload_1);
                    break;

                case 40: // '('
                    DLOAD_2 dload_2 = new DLOAD_2();
                    dload_2.read(din);
                    i += dload_2.length();
                    dload_2.setOffset(i);
                    bcd.add(dload_2);
                    break;

                case 41: // ')'
                    DLOAD_3 dload_3 = new DLOAD_3();
                    dload_3.read(din);
                    i += dload_3.length();
                    dload_3.setOffset(i);
                    bcd.add(dload_3);
                    break;

                case 42: // '*'
                    ALOAD_0 aload_0 = new ALOAD_0();
                    aload_0.read(din);
                    i += aload_0.length();
                    aload_0.setOffset(i);
                    bcd.add(aload_0);
                    break;

                case 43: // '+'
                    ALOAD_1 aload_1 = new ALOAD_1();
                    aload_1.read(din);
                    i += aload_1.length();
                    aload_1.setOffset(i);
                    bcd.add(aload_1);
                    break;

                case 44: // ','
                    ALOAD_2 aload_2 = new ALOAD_2();
                    aload_2.read(din);
                    i += aload_2.length();
                    aload_2.setOffset(i);
                    bcd.add(aload_2);
                    break;

                case 45: // '-'
                    ALOAD_3 aload_3 = new ALOAD_3();
                    aload_3.read(din);
                    i += aload_3.length();
                    aload_3.setOffset(i);
                    bcd.add(aload_3);
                    break;

                case 46: // '.'
                    IALOAD iaload = new IALOAD();
                    iaload.read(din);
                    i += iaload.length();
                    iaload.setOffset(i);
                    bcd.add(iaload);
                    break;

                case 47: // '/'
                    LALOAD laload = new LALOAD();
                    laload.read(din);
                    i += laload.length();
                    laload.setOffset(i);
                    bcd.add(laload);
                    break;

                case 48: // '0'
                    FALOAD faload = new FALOAD();
                    faload.read(din);
                    i += faload.length();
                    faload.setOffset(i);
                    bcd.add(faload);
                    break;

                case 49: // '1'
                    DALOAD daload = new DALOAD();
                    daload.read(din);
                    i += daload.length();
                    daload.setOffset(i);
                    bcd.add(daload);
                    break;

                case 50: // '2'
                    AALOAD aaload = new AALOAD();
                    aaload.read(din);
                    i += aaload.length();
                    aaload.setOffset(i);
                    bcd.add(aaload);
                    break;

                case 51: // '3'
                    BALOAD baload = new BALOAD();
                    baload.read(din);
                    i += baload.length();
                    baload.setOffset(i);
                    bcd.add(baload);
                    break;

                case 52: // '4'
                    CALOAD caload = new CALOAD();
                    caload.read(din);
                    i += caload.length();
                    caload.setOffset(i);
                    bcd.add(caload);
                    break;

                case 53: // '5'
                    SALOAD saload = new SALOAD();
                    saload.read(din);
                    i += saload.length();
                    saload.setOffset(i);
                    bcd.add(saload);
                    break;

                case 54: // '6'
                    ISTORE istore = new ISTORE();
                    istore.read(din);
                    i += istore.length();
                    istore.setOffset(i);
                    bcd.add(istore);
                    break;

                case 55: // '7'
                    LSTORE lstore = new LSTORE();
                    lstore.read(din);
                    i += lstore.length();
                    lstore.setOffset(i);
                    bcd.add(lstore);
                    break;

                case 56: // '8'
                    FSTORE fstore = new FSTORE();
                    fstore.read(din);
                    i += fstore.length();
                    fstore.setOffset(i);
                    bcd.add(fstore);
                    break;

                case 57: // '9'
                    DSTORE dstore = new DSTORE();
                    dstore.read(din);
                    i += dstore.length();
                    dstore.setOffset(i);
                    bcd.add(dstore);
                    break;

                case 58: // ':'
                    ASTORE astore = new ASTORE();
                    astore.read(din);
                    i += astore.length();
                    astore.setOffset(i);
                    bcd.add(astore);
                    break;

                case 59: // ';'
                    ISTORE_0 istore_0 = new ISTORE_0();
                    istore_0.read(din);
                    i += istore_0.length();
                    istore_0.setOffset(i);
                    bcd.add(istore_0);
                    break;

                case 60: // '<'
                    ISTORE_1 istore_1 = new ISTORE_1();
                    istore_1.read(din);
                    i += istore_1.length();
                    istore_1.setOffset(i);
                    bcd.add(istore_1);
                    break;

                case 61: // '='
                    ISTORE_2 istore_2 = new ISTORE_2();
                    istore_2.read(din);
                    i += istore_2.length();
                    istore_2.setOffset(i);
                    bcd.add(istore_2);
                    break;

                case 62: // '>'
                    ISTORE_3 istore_3 = new ISTORE_3();
                    istore_3.read(din);
                    i += istore_3.length();
                    istore_3.setOffset(i);
                    bcd.add(istore_3);
                    break;

                case 63: // '?'
                    LSTORE_0 lstore_0 = new LSTORE_0();
                    lstore_0.read(din);
                    i += lstore_0.length();
                    lstore_0.setOffset(i);
                    bcd.add(lstore_0);
                    break;

                case 64: // '@'
                    LSTORE_1 lstore_1 = new LSTORE_1();
                    lstore_1.read(din);
                    i += lstore_1.length();
                    lstore_1.setOffset(i);
                    bcd.add(lstore_1);
                    break;

                case 65: // 'A'
                    LSTORE_2 lstore_2 = new LSTORE_2();
                    lstore_2.read(din);
                    i += lstore_2.length();
                    lstore_2.setOffset(i);
                    bcd.add(lstore_2);
                    break;

                case 66: // 'B'
                    LSTORE_3 lstore_3 = new LSTORE_3();
                    lstore_3.read(din);
                    i += lstore_3.length();
                    lstore_3.setOffset(i);
                    bcd.add(lstore_3);
                    break;

                case 67: // 'C'
                    FSTORE_0 fstore_0 = new FSTORE_0();
                    fstore_0.read(din);
                    i += fstore_0.length();
                    fstore_0.setOffset(i);
                    bcd.add(fstore_0);
                    break;

                case 68: // 'D'
                    FSTORE_1 fstore_1 = new FSTORE_1();
                    fstore_1.read(din);
                    i += fstore_1.length();
                    fstore_1.setOffset(i);
                    bcd.add(fstore_1);
                    break;

                case 69: // 'E'
                    FSTORE_2 fstore_2 = new FSTORE_2();
                    fstore_2.read(din);
                    i += fstore_2.length();
                    fstore_2.setOffset(i);
                    bcd.add(fstore_2);
                    break;

                case 70: // 'F'
                    FSTORE_3 fstore_3 = new FSTORE_3();
                    fstore_3.read(din);
                    i += fstore_3.length();
                    fstore_3.setOffset(i);
                    bcd.add(fstore_3);
                    break;

                case 71: // 'G'
                    DSTORE_0 dstore_0 = new DSTORE_0();
                    dstore_0.read(din);
                    i += dstore_0.length();
                    dstore_0.setOffset(i);
                    bcd.add(dstore_0);
                    break;

                case 72: // 'H'
                    DSTORE_1 dstore_1 = new DSTORE_1();
                    dstore_1.read(din);
                    i += dstore_1.length();
                    dstore_1.setOffset(i);
                    bcd.add(dstore_1);
                    break;

                case 73: // 'I'
                    DSTORE_2 dstore_2 = new DSTORE_2();
                    dstore_2.read(din);
                    i += dstore_2.length();
                    dstore_2.setOffset(i);
                    bcd.add(dstore_2);
                    break;

                case 74: // 'J'
                    DSTORE_3 dstore_3 = new DSTORE_3();
                    dstore_3.read(din);
                    i += dstore_3.length();
                    dstore_3.setOffset(i);
                    bcd.add(dstore_3);
                    break;

                case 75: // 'K'
                    ASTORE_0 astore_0 = new ASTORE_0();
                    astore_0.read(din);
                    i += astore_0.length();
                    astore_0.setOffset(i);
                    bcd.add(astore_0);
                    break;

                case 76: // 'L'
                    ASTORE_1 astore_1 = new ASTORE_1();
                    astore_1.read(din);
                    i += astore_1.length();
                    astore_1.setOffset(i);
                    bcd.add(astore_1);
                    break;

                case 77: // 'M'
                    ASTORE_2 astore_2 = new ASTORE_2();
                    astore_2.read(din);
                    i += astore_2.length();
                    astore_2.setOffset(i);
                    bcd.add(astore_2);
                    break;

                case 78: // 'N'
                    ASTORE_3 astore_3 = new ASTORE_3();
                    astore_3.read(din);
                    i += astore_3.length();
                    astore_3.setOffset(i);
                    bcd.add(astore_3);
                    break;

                case 79: // 'O'
                    IASTORE iastore = new IASTORE();
                    iastore.read(din);
                    i += iastore.length();
                    iastore.setOffset(i);
                    bcd.add(iastore);
                    break;

                case 80: // 'P'
                    LASTORE lastore = new LASTORE();
                    lastore.read(din);
                    i += lastore.length();
                    lastore.setOffset(i);
                    bcd.add(lastore);
                    break;

                case 81: // 'Q'
                    FASTORE fastore = new FASTORE();
                    fastore.read(din);
                    i += fastore.length();
                    fastore.setOffset(i);
                    bcd.add(fastore);
                    break;

                case 82: // 'R'
                    DASTORE dastore = new DASTORE();
                    dastore.read(din);
                    i += dastore.length();
                    dastore.setOffset(i);
                    bcd.add(dastore);
                    break;

                case 83: // 'S'
                    AASTORE aastore = new AASTORE();
                    aastore.read(din);
                    i += aastore.length();
                    aastore.setOffset(i);
                    bcd.add(aastore);
                    break;

                case 84: // 'T'
                    BASTORE bastore = new BASTORE();
                    bastore.read(din);
                    i += bastore.length();
                    bastore.setOffset(i);
                    bcd.add(bastore);
                    break;

                case 85: // 'U'
                    CASTORE castore = new CASTORE();
                    castore.read(din);
                    i += castore.length();
                    castore.setOffset(i);
                    bcd.add(castore);
                    break;

                case 86: // 'V'
                    SASTORE sastore = new SASTORE();
                    sastore.read(din);
                    i += sastore.length();
                    sastore.setOffset(i);
                    bcd.add(sastore);
                    break;

                case 87: // 'W'
                    POP pop = new POP();
                    pop.read(din);
                    i += pop.length();
                    pop.setOffset(i);
                    bcd.add(pop);
                    break;

                case 88: // 'X'
                    POP2 pop2 = new POP2();
                    pop2.read(din);
                    i += pop2.length();
                    pop2.setOffset(i);
                    bcd.add(pop2);
                    break;

                case 89: // 'Y'
                    DUP dup = new DUP();
                    dup.read(din);
                    i += dup.length();
                    dup.setOffset(i);
                    bcd.add(dup);
                    break;

                case 90: // 'Z'
                    DUP_X1 dup_x1 = new DUP_X1();
                    dup_x1.read(din);
                    i += dup_x1.length();
                    dup_x1.setOffset(i);
                    bcd.add(dup_x1);
                    break;

                case 91: // '['
                    DUP_X2 dup_x2 = new DUP_X2();
                    dup_x2.read(din);
                    i += dup_x2.length();
                    dup_x2.setOffset(i);
                    bcd.add(dup_x2);
                    break;

                case 92: // '\\'
                    DUP2 dup2 = new DUP2();
                    dup2.read(din);
                    i += dup2.length();
                    dup2.setOffset(i);
                    bcd.add(dup2);
                    break;

                case 93: // ']'
                    DUP2_X1 dup2_x1 = new DUP2_X1();
                    dup2_x1.read(din);
                    i += dup2_x1.length();
                    dup2_x1.setOffset(i);
                    bcd.add(dup2_x1);
                    break;

                case 94: // '^'
                    DUP2_X2 dup2_x2 = new DUP2_X2();
                    dup2_x2.read(din);
                    i += dup2_x2.length();
                    dup2_x2.setOffset(i);
                    bcd.add(dup2_x2);
                    break;

                case 95: // '_'
                    SWAP swap = new SWAP();
                    swap.read(din);
                    i += swap.length();
                    swap.setOffset(i);
                    bcd.add(swap);
                    break;

                case 96: // '`'
                    IADD iadd = new IADD();
                    iadd.read(din);
                    i += iadd.length();
                    iadd.setOffset(i);
                    bcd.add(iadd);
                    break;

                case 97: // 'a'
                    LADD ladd = new LADD();
                    ladd.read(din);
                    i += ladd.length();
                    ladd.setOffset(i);
                    bcd.add(ladd);
                    break;

                case 98: // 'b'
                    FADD fadd = new FADD();
                    fadd.read(din);
                    i += fadd.length();
                    fadd.setOffset(i);
                    bcd.add(fadd);
                    break;

                case 99: // 'c'
                    DADD dadd = new DADD();
                    dadd.read(din);
                    i += dadd.length();
                    dadd.setOffset(i);
                    bcd.add(dadd);
                    break;

                case 100: // 'd'
                    ISUB isub = new ISUB();
                    isub.read(din);
                    i += isub.length();
                    isub.setOffset(i);
                    bcd.add(isub);
                    break;

                case 101: // 'e'
                    LSUB lsub = new LSUB();
                    lsub.read(din);
                    i += lsub.length();
                    lsub.setOffset(i);
                    bcd.add(lsub);
                    break;

                case 102: // 'f'
                    FSUB fsub = new FSUB();
                    fsub.read(din);
                    i += fsub.length();
                    fsub.setOffset(i);
                    bcd.add(fsub);
                    break;

                case 103: // 'g'
                    DSUB dsub = new DSUB();
                    dsub.read(din);
                    i += dsub.length();
                    dsub.setOffset(i);
                    bcd.add(dsub);
                    break;

                case 104: // 'h'
                    IMUL imul = new IMUL();
                    imul.read(din);
                    i += imul.length();
                    imul.setOffset(i);
                    bcd.add(imul);
                    break;

                case 105: // 'i'
                    LMUL lmul = new LMUL();
                    lmul.read(din);
                    i += lmul.length();
                    lmul.setOffset(i);
                    bcd.add(lmul);
                    break;

                case 106: // 'j'
                    FMUL fmul = new FMUL();
                    fmul.read(din);
                    i += fmul.length();
                    fmul.setOffset(i);
                    bcd.add(fmul);
                    break;

                case 107: // 'k'
                    DMUL dmul = new DMUL();
                    dmul.read(din);
                    i += dmul.length();
                    dmul.setOffset(i);
                    bcd.add(dmul);
                    break;

                case 108: // 'l'
                    IDIV idiv = new IDIV();
                    idiv.read(din);
                    i += idiv.length();
                    idiv.setOffset(i);
                    bcd.add(idiv);
                    break;

                case 109: // 'm'
                    LDIV ldiv = new LDIV();
                    ldiv.read(din);
                    i += ldiv.length();
                    ldiv.setOffset(i);
                    bcd.add(ldiv);
                    break;

                case 110: // 'n'
                    FDIV fdiv = new FDIV();
                    fdiv.read(din);
                    i += fdiv.length();
                    fdiv.setOffset(i);
                    bcd.add(fdiv);
                    break;

                case 111: // 'o'
                    DDIV ddiv = new DDIV();
                    ddiv.read(din);
                    i += ddiv.length();
                    ddiv.setOffset(i);
                    bcd.add(ddiv);
                    break;

                case 112: // 'p'
                    IREM irem = new IREM();
                    irem.read(din);
                    i += irem.length();
                    irem.setOffset(i);
                    bcd.add(irem);
                    break;

                case 113: // 'q'
                    LREM lrem = new LREM();
                    lrem.read(din);
                    i += lrem.length();
                    lrem.setOffset(i);
                    bcd.add(lrem);
                    break;

                case 114: // 'r'
                    FREM frem = new FREM();
                    frem.read(din);
                    i += frem.length();
                    frem.setOffset(i);
                    bcd.add(frem);
                    break;

                case 115: // 's'
                    DREM drem = new DREM();
                    drem.read(din);
                    i += drem.length();
                    drem.setOffset(i);
                    bcd.add(drem);
                    break;

                case 116: // 't'
                    INEG ineg = new INEG();
                    ineg.read(din);
                    i += ineg.length();
                    ineg.setOffset(i);
                    bcd.add(ineg);
                    break;

                case 117: // 'u'
                    LNEG lneg = new LNEG();
                    lneg.read(din);
                    i += lneg.length();
                    lneg.setOffset(i);
                    bcd.add(lneg);
                    break;

                case 118: // 'v'
                    FNEG fneg = new FNEG();
                    fneg.read(din);
                    i += fneg.length();
                    fneg.setOffset(i);
                    bcd.add(fneg);
                    break;

                case 119: // 'w'
                    DNEG dneg = new DNEG();
                    dneg.read(din);
                    i += dneg.length();
                    dneg.setOffset(i);
                    bcd.add(dneg);
                    break;

                case 120: // 'x'
                    ISHL ishl = new ISHL();
                    ishl.read(din);
                    i += ishl.length();
                    ishl.setOffset(i);
                    bcd.add(ishl);
                    break;

                case 121: // 'y'
                    LSHL lshl = new LSHL();
                    lshl.read(din);
                    i += lshl.length();
                    lshl.setOffset(i);
                    bcd.add(lshl);
                    break;

                case 122: // 'z'
                    ISHR ishr = new ISHR();
                    ishr.read(din);
                    i += ishr.length();
                    ishr.setOffset(i);
                    bcd.add(ishr);
                    break;

                case 123: // '{'
                    LSHR lshr = new LSHR();
                    lshr.read(din);
                    i += lshr.length();
                    lshr.setOffset(i);
                    bcd.add(lshr);
                    break;

                case 124: // '|'
                    IUSHR iushr = new IUSHR();
                    iushr.read(din);
                    i += iushr.length();
                    iushr.setOffset(i);
                    bcd.add(iushr);
                    break;

                case 125: // '}'
                    LUSHR lushr = new LUSHR();
                    lushr.read(din);
                    i += lushr.length();
                    lushr.setOffset(i);
                    bcd.add(lushr);
                    break;

                case 126: // '~'
                    IAND iand = new IAND();
                    iand.read(din);
                    i += iand.length();
                    iand.setOffset(i);
                    bcd.add(iand);
                    break;

                case 127: // '\177'
                    LAND land = new LAND();
                    land.read(din);
                    i += land.length();
                    land.setOffset(i);
                    bcd.add(land);
                    break;

                case 128:
                    IOR ior = new IOR();
                    ior.read(din);
                    i += ior.length();
                    ior.setOffset(i);
                    bcd.add(ior);
                    break;

                case 129:
                    LOR lor = new LOR();
                    lor.read(din);
                    i += lor.length();
                    lor.setOffset(i);
                    bcd.add(lor);
                    break;

                case 130:
                    IXOR ixor = new IXOR();
                    ixor.read(din);
                    i += ixor.length();
                    ixor.setOffset(i);
                    bcd.add(ixor);
                    break;

                case 131:
                    LXOR lxor = new LXOR();
                    lxor.read(din);
                    i += lxor.length();
                    lxor.setOffset(i);
                    bcd.add(lxor);
                    break;

                case 132:
                    IINC iinc = new IINC();
                    iinc.read(din);
                    i += iinc.length();
                    iinc.setOffset(i);
                    bcd.add(iinc);
                    break;

                case 133:
                    I2L i2l = new I2L();
                    i2l.read(din);
                    i += i2l.length();
                    i2l.setOffset(i);
                    bcd.add(i2l);
                    break;

                case 134:
                    I2F i2f = new I2F();
                    i2f.read(din);
                    i += i2f.length();
                    i2f.setOffset(i);
                    bcd.add(i2f);
                    break;

                case 135:
                    I2D i2d = new I2D();
                    i2d.read(din);
                    i += i2d.length();
                    i2d.setOffset(i);
                    bcd.add(i2d);
                    break;

                case 136:
                    L2I l2i = new L2I();
                    l2i.read(din);
                    i += l2i.length();
                    l2i.setOffset(i);
                    bcd.add(l2i);
                    break;

                case 137:
                    L2F l2f = new L2F();
                    l2f.read(din);
                    i += l2f.length();
                    l2f.setOffset(i);
                    bcd.add(l2f);
                    break;

                case 138:
                    L2D l2d = new L2D();
                    l2d.read(din);
                    i += l2d.length();
                    l2d.setOffset(i);
                    bcd.add(l2d);
                    break;

                case 139:
                    F2I f2i = new F2I();
                    f2i.read(din);
                    i += f2i.length();
                    f2i.setOffset(i);
                    bcd.add(f2i);
                    break;

                case 140:
                    F2L f2l = new F2L();
                    f2l.read(din);
                    i += f2l.length();
                    f2l.setOffset(i);
                    bcd.add(f2l);
                    break;

                case 141:
                    F2D f2d = new F2D();
                    f2d.read(din);
                    i += f2d.length();
                    f2d.setOffset(i);
                    bcd.add(f2d);
                    break;

                case 142:
                    D2I d2i = new D2I();
                    d2i.read(din);
                    i += d2i.length();
                    d2i.setOffset(i);
                    bcd.add(d2i);
                    break;

                case 143:
                    D2L d2l = new D2L();
                    d2l.read(din);
                    i += d2l.length();
                    d2l.setOffset(i);
                    bcd.add(d2l);
                    break;

                case 144:
                    D2F d2f = new D2F();
                    d2f.read(din);
                    i += d2f.length();
                    d2f.setOffset(i);
                    bcd.add(d2f);
                    break;

                case 145:
                    I2B i2b = new I2B();
                    i2b.read(din);
                    i += i2b.length();
                    i2b.setOffset(i);
                    bcd.add(i2b);
                    break;

                case 146:
                    I2C i2c = new I2C();
                    i2c.read(din);
                    i += i2c.length();
                    i2c.setOffset(i);
                    bcd.add(i2c);
                    break;

                case 147:
                    I2S i2s = new I2S();
                    i2s.read(din);
                    i += i2s.length();
                    i2s.setOffset(i);
                    bcd.add(i2s);
                    break;

                case 148:
                    LCMP lcmp = new LCMP();
                    lcmp.read(din);
                    i += lcmp.length();
                    lcmp.setOffset(i);
                    bcd.add(lcmp);
                    break;

                case 149:
                    FCMPL fcmpl = new FCMPL();
                    fcmpl.read(din);
                    i += fcmpl.length();
                    fcmpl.setOffset(i);
                    bcd.add(fcmpl);
                    break;

                case 150:
                    FCMPG fcmpg = new FCMPG();
                    fcmpg.read(din);
                    i += fcmpg.length();
                    fcmpg.setOffset(i);
                    bcd.add(fcmpg);
                    break;

                case 151:
                    DCMPL dcmpl = new DCMPL();
                    dcmpl.read(din);
                    i += dcmpl.length();
                    dcmpl.setOffset(i);
                    bcd.add(dcmpl);
                    break;

                case 152:
                    DCMPG dcmpg = new DCMPG();
                    dcmpg.read(din);
                    i += dcmpg.length();
                    dcmpg.setOffset(i);
                    bcd.add(dcmpg);
                    break;

                case 153:
                    IFEQ ifeq = new IFEQ();
                    ifeq.read(din);
                    i += ifeq.length();
                    ifeq.setOffset(i);
                    bcd.add(ifeq);
                    break;

                case 154:
                    IFNE ifne = new IFNE();
                    ifne.read(din);
                    i += ifne.length();
                    ifne.setOffset(i);
                    bcd.add(ifne);
                    break;

                case 155:
                    IFLT iflt = new IFLT();
                    iflt.read(din);
                    i += iflt.length();
                    iflt.setOffset(i);
                    bcd.add(iflt);
                    break;

                case 156:
                    IFGE ifge = new IFGE();
                    ifge.read(din);
                    i += ifge.length();
                    ifge.setOffset(i);
                    bcd.add(ifge);
                    break;

                case 157:
                    IFGT ifgt = new IFGT();
                    ifgt.read(din);
                    i += ifgt.length();
                    ifgt.setOffset(i);
                    bcd.add(ifgt);
                    break;

                case 158:
                    IFLE ifle = new IFLE();
                    ifle.read(din);
                    i += ifle.length();
                    ifle.setOffset(i);
                    bcd.add(ifle);
                    break;

                case 159:
                    IF_ICMPEQ if_icmpeq = new IF_ICMPEQ();
                    if_icmpeq.read(din);
                    i += if_icmpeq.length();
                    if_icmpeq.setOffset(i);
                    bcd.add(if_icmpeq);
                    break;

                case 160:
                    IF_ICMPNE if_icmpne = new IF_ICMPNE();
                    if_icmpne.read(din);
                    i += if_icmpne.length();
                    if_icmpne.setOffset(i);
                    bcd.add(if_icmpne);
                    break;

                case 161:
                    IF_ICMPLT if_icmplt = new IF_ICMPLT();
                    if_icmplt.read(din);
                    i += if_icmplt.length();
                    if_icmplt.setOffset(i);
                    bcd.add(if_icmplt);
                    break;

                case 162:
                    IF_ICMPGE if_icmpge = new IF_ICMPGE();
                    if_icmpge.read(din);
                    i += if_icmpge.length();
                    if_icmpge.setOffset(i);
                    bcd.add(if_icmpge);
                    break;

                case 163:
                    IF_ICMPGT if_icmpgt = new IF_ICMPGT();
                    if_icmpgt.setOffset(i);
                    if_icmpgt.read(din);
                    i += if_icmpgt.length();
                    bcd.add(if_icmpgt);
                    break;

                case 164:
                    IF_ICMPLE if_icmple = new IF_ICMPLE();
                    if_icmple.setOffset(i);
                    if_icmple.read(din);
                    i += if_icmple.length();
                    bcd.add(if_icmple);
                    break;

                case 165:
                    IF_ACMPEQ if_acmpeq = new IF_ACMPEQ();
                    if_acmpeq.setOffset(i);
                    if_acmpeq.read(din);
                    i += if_acmpeq.length();
                    bcd.add(if_acmpeq);
                    break;

                case 166:
                    IF_ACMPNE if_acmpne = new IF_ACMPNE();
                    if_acmpne.setOffset(i);
                    if_acmpne.read(din);
                    i += if_acmpne.length();
                    bcd.add(if_acmpne);
                    break;

                case 167:
                    GOTO goto1 = new GOTO();
                    goto1.setOffset(i);
                    goto1.read(din);
                    i += goto1.length();
                    bcd.add(goto1);
                    break;

                case 168:
                    JSR jsr = new JSR();
                    jsr.setOffset(i);
                    jsr.read(din);
                    i += jsr.length();
                    bcd.add(jsr);
                    break;

                case 169:
                    RET ret = new RET();
                    ret.setOffset(i);
                    ret.read(din);
                    i += ret.length();
                    bcd.add(ret);
                    break;

                case 170:
                    TABLESWITCH tableswitch = new TABLESWITCH();
                    tableswitch.setOffset(i);
                    tableswitch.read(din);
                    i += tableswitch.length();
                    bcd.add(tableswitch);
                    break;

                case 171:
                    LOOKUPSWITCH lookupswitch = new LOOKUPSWITCH();
                    lookupswitch.setOffset(i);
                    lookupswitch.read(din);
                    i += lookupswitch.length();
                    bcd.add(lookupswitch);
                    break;

                case 172:
                    IRETURN ireturn = new IRETURN();
                    ireturn.read(din);
                    i += ireturn.length();
                    ireturn.setOffset(i);
                    bcd.add(ireturn);
                    break;

                case 173:
                    LRETURN lreturn = new LRETURN();
                    lreturn.read(din);
                    i += lreturn.length();
                    lreturn.setOffset(i);
                    bcd.add(lreturn);
                    break;

                case 174:
                    FRETURN freturn = new FRETURN();
                    freturn.read(din);
                    i += freturn.length();
                    freturn.setOffset(i);
                    bcd.add(freturn);
                    break;

                case 175:
                    DRETURN dreturn = new DRETURN();
                    dreturn.read(din);
                    i += dreturn.length();
                    dreturn.setOffset(i);
                    bcd.add(dreturn);
                    break;

                case 176:
                    ARETURN areturn = new ARETURN();
                    areturn.setOffset(i);
                    areturn.read(din);
                    i += areturn.length();
                    bcd.add(areturn);
                    break;

                case 177:
                    RETURN return1 = new RETURN();
                    return1.setOffset(i);
                    return1.read(din);
                    i += return1.length();
                    bcd.add(return1);
                    break;

                case 178:
                    GETSTATIC getstatic = new GETSTATIC();
                    getstatic.setOffset(i);
                    getstatic.read(din);
                    i += getstatic.length();
                    bcd.add(getstatic);
                    break;

                case 179:
                    PUTSTATIC putstatic = new PUTSTATIC();
                    putstatic.setOffset(i);
                    putstatic.read(din);
                    i += putstatic.length();
                    bcd.add(putstatic);
                    break;

                case 180:
                    GETFIELD getfield = new GETFIELD();
                    getfield.setOffset(i);
                    getfield.read(din);
                    i += getfield.length();
                    bcd.add(getfield);
                    break;

                case 181:
                    PUTFIELD putfield = new PUTFIELD();
                    putfield.setOffset(i);
                    putfield.read(din);
                    i += putfield.length();
                    bcd.add(putfield);
                    break;

                case 182:
                    INVOKEVIRTUAL invokevirtual = new INVOKEVIRTUAL();
                    invokevirtual.setOffset(i);
                    invokevirtual.read(din);
                    i += invokevirtual.length();
                    bcd.add(invokevirtual);
                    break;

                case 183:
                    INVOKESPECIAL invokespecial = new INVOKESPECIAL();
                    invokespecial.setOffset(i);
                    invokespecial.read(din);
                    i += invokespecial.length();
                    bcd.add(invokespecial);
                    break;

                case 184:
                    INVOKESTATIC invokestatic = new INVOKESTATIC();
                    invokestatic.setOffset(i);
                    invokestatic.read(din);
                    i += invokestatic.length();
                    bcd.add(invokestatic);
                    break;

                case 185:
                    INVOKEINTERFACE invokeinterface = new INVOKEINTERFACE();
                    invokeinterface.setOffset(i);
                    invokeinterface.read(din);
                    i += invokeinterface.length();
                    bcd.add(invokeinterface);
                    break;

                case 187:
                    NEW new1 = new NEW();
                    new1.setOffset(i);
                    new1.read(din);
                    i += new1.length();
                    bcd.add(new1);
                    break;

                case 188:
                    NEWARRAY newarray = new NEWARRAY();
                    newarray.setOffset(i);
                    newarray.read(din);
                    i += newarray.length();
                    bcd.add(newarray);
                    break;

                case 189:
                    ANEWARRAY anewarray = new ANEWARRAY();
                    anewarray.read(din);
                    anewarray.setOffset(i);
                    i += anewarray.length();
                    bcd.add(anewarray);
                    break;

                case 190:
                    ARRAYLENGTH arraylength = new ARRAYLENGTH();
                    arraylength.setOffset(i);
                    arraylength.read(din);
                    i += arraylength.length();
                    bcd.add(arraylength);
                    break;

                case 191:
                    ATHROW athrow = new ATHROW();
                    athrow.setOffset(i);
                    athrow.read(din);
                    i += athrow.length();
                    bcd.add(athrow);
                    break;

                case 192:
                    CHECKCAST checkcast = new CHECKCAST();
                    checkcast.setOffset(i);
                    checkcast.read(din);
                    i += checkcast.length();
                    bcd.add(checkcast);
                    break;

                case 193:
                    INSTANCEOF instanceof1 = new INSTANCEOF();
                    instanceof1.setOffset(i);
                    instanceof1.read(din);
                    i += instanceof1.length();
                    bcd.add(instanceof1);
                    break;

                case 194:
                    MONITORENTER monitorenter = new MONITORENTER();
                    monitorenter.setOffset(i);
                    monitorenter.read(din);
                    i += monitorenter.length();
                    bcd.add(monitorenter);
                    break;

                case 195:
                    MONITOREXIT monitorexit = new MONITOREXIT();
                    monitorexit.setOffset(i);
                    monitorexit.read(din);
                    i += monitorexit.length();
                    bcd.add(monitorexit);
                    break;

                case 196:
                    WIDE wide = new WIDE();
                    wide.setOffset(i);
                    wide.read(din);
                    i += wide.length();
                    bcd.add(wide);
                    break;

                case 197:
                    MULTIANEWARRAY multianewarray = new MULTIANEWARRAY();
                    multianewarray.setOffset(i);
                    multianewarray.read(din);
                    i += multianewarray.length();
                    bcd.add(multianewarray);
                    break;

                case 198:
                    IFNULL ifnull = new IFNULL();
                    ifnull.setOffset(i);
                    ifnull.read(din);
                    i += ifnull.length();
                    bcd.add(ifnull);
                    break;

                case 199:
                    IFNONNULL ifnonnull = new IFNONNULL();
                    ifnonnull.setOffset(i);
                    ifnonnull.read(din);
                    i += ifnonnull.length();
                    bcd.add(ifnonnull);
                    break;

                case 200:
                    GOTO_W goto_w = new GOTO_W();
                    goto_w.setOffset(i);
                    goto_w.read(din);
                    i += goto_w.length();
                    bcd.add(goto_w);
                    break;

                case 201:
                    JSR_W jsr_w = new JSR_W();
                    jsr_w.setOffset(i);
                    jsr_w.read(din);
                    i += jsr_w.length();
                    bcd.add(jsr_w);
                    break;

                case 186:
                case 254:
                case 255:
                    NOP nn = new NOP();
                    nn.setOffset(i);
                    bcd.add(nn);
                    // fall through

                case 202:
                case 203:
                case 204:
                case 205:
                case 206:
                case 207:
                case 208:
                case 209:
                case 210:
                case 211:
                case 212:
                case 213:
                case 214:
                case 215:
                case 216:
                case 217:
                case 218:
                case 219:
                case 220:
                case 221:
                case 222:
                case 223:
                case 224:
                case 225:
                case 226:
                case 227:
                case 228:
                case 229:
                case 230:
                case 231:
                case 232:
                case 233:
                case 234:
                case 235:
                case 236:
                case 237:
                case 238:
                case 239:
                case 240:
                case 241:
                case 242:
                case 243:
                case 244:
                case 245:
                case 246:
                case 247:
                case 248:
                case 249:
                case 250:
                case 251:
                case 252:
                case 253:
                default:
                    i++;
                    break;
            }
        } while (true);
        din.close();
        bain.close();
    }

    public BCD getBCD() {
        return bcd;
    }

    public void setBCD(BCD nBCD) {
        bcd = nBCD;
    }

    private void writeBCD(DataOutputStream dout)
            throws IOException {
        code_length = bcd.getAllLength();
        if (Debug.isEnabled())
            System.out.println((new StringBuilder()).append("Write vhly 's bytecode length:").append(code_length).toString());
        dout.writeInt(code_length);
        BaseCode bc;
        for (Enumeration en = bcd.getCodes(); en.hasMoreElements(); bc.write(dout))
            bc = (BaseCode) en.nextElement();

    }

    public void delBCOffLen(int offset, int len) {
        for (int i = 0; i < exception_len; i++) {
            ExceptionTable et = (ExceptionTable) (ExceptionTable) exceptions.elementAt(i);
            int s = et.getStartPC();
            int e = et.getEndPC();
            int h = et.getHandlerPC();
            int ct = et.getCatchType();
            if (offset > s && offset > e)
                continue;
            if (offset > s && offset < e) {
                e -= len;
                et.setEndPC(e);
            }
            if (offset < s) {
                s -= len;
                et.setStartPC(s);
                e -= len;
                et.setEndPC(e);
                h -= len;
                et.setHandlerPC(h);
            }
        }

    }

    public void addBCOffLen(int offset, int len) {
        for (int i = 0; i < exception_len; i++) {
            ExceptionTable et = (ExceptionTable) (ExceptionTable) exceptions.elementAt(i);
            int s = et.getStartPC();
            int e = et.getEndPC();
            int h = et.getHandlerPC();
            int ct = et.getCatchType();
            if (offset > s && offset > e)
                continue;
            if (offset > s && offset < e) {
                e += len;
                et.setEndPC(e);
            }
            if (offset < s) {
                s += len;
                et.setStartPC(s);
                e += len;
                et.setEndPC(e);
                h += len;
                et.setHandlerPC(h);
            }
        }

    }
}